/**
 * Agent智能体相关类型定义
 */

// 智能体状态枚举
export enum AgentStatus {
  DISABLED = "0",  // 停用
  ENABLED = "1",   // 启用
  TRAINING = "2"   // 训练中
}

// 智能体状态标签映射
export const AgentStatusLabels = {
  [AgentStatus.DISABLED]: "停用",
  [AgentStatus.ENABLED]: "启用",
  [AgentStatus.TRAINING]: "训练中"
}

// 智能体状态颜色映射
export const AgentStatusColors = {
  [AgentStatus.DISABLED]: "info",
  [AgentStatus.ENABLED]: "success",
  [AgentStatus.TRAINING]: "warning"
}

// 智能体基础信息
export interface AIWebAgent {
  agent_id: string
  scene_id: string
  tenant_id: string
  agent_code: string
  agent_name: string
  sys_prompt: string
  llm_code: string
  embedding_code: string
  tools_list: any[]
  mcp_list: any[]
  rag_list: any[]
  status: AgentStatus
  version: string
  is_deleted: number
  created_by: string
  created_at: string
  updated_by?: string
  updated_at?: string
}

// 创建智能体请求
export interface CreateAgentRequest {
  scene_id: string
  tenant_id?: string
  agent_code: string
  agent_name: string
  sys_prompt: string
  llm_code: string
  embedding_code: string
  tools_list?: any[]
  mcp_list?: any[]
  rag_list?: any[]
  status?: AgentStatus
  version?: string
  created_by: string
}

// 更新智能体请求
export interface UpdateAgentRequest {
  agent_code?: string
  agent_name?: string
  sys_prompt?: string
  llm_code?: string
  embedding_code?: string
  tools_list?: any[]
  mcp_list?: any[]
  rag_list?: any[]
  status?: AgentStatus
  version?: string
  updated_by: string
}

// 智能体查询参数
export interface AgentQueryParams {
  page?: number
  page_size?: number
  scene_id?: string
  tenant_id?: string
  agent_name?: string
  status?: AgentStatus
  llm_code?: string
  created_by?: string
  is_deleted?: number
}

// 智能体列表响应
export interface AgentListResponse {
  total: number
  items: AIWebAgent[]
}

// 状态更新请求
export interface AgentStatusUpdateRequest {
  status: AgentStatus
  updated_by: string
}

// 版本更新请求
export interface AgentVersionUpdateRequest {
  version: string
  updated_by: string
}

// 克隆智能体请求
export interface CloneAgentRequest {
  new_agent_name: string
  created_by: string
}

// 智能体配置摘要
export interface AgentConfigSummary {
  agent_id: string
  agent_name: string
  llm_code: string
  embedding_code: string
  tools_count: number
  mcp_count: number
  rag_count: number
  status: AgentStatus
  version: string
}

// 表单数据接口
export interface AgentFormData {
  scene_id: string
  agent_name: string
  agent_code: string
  sys_prompt: string
  llm_code: string
  embedding_code: string
  status: AgentStatus
  version: string
  tenant_id: string
  tools_list: any[]
  mcp_list: any[]
  rag_list: any[]
} 